﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Shapes;

namespace Sabloane_de_proiectare.Command
{
    class HorizontalRail : Canvas
    {
        public HorizontalRail()
        {
            Rectangle line1 = new Rectangle();
            line1.Height = 50;
            line1.Width = 5;
            line1.Fill = new SolidColorBrush(Colors.Black);
            Canvas.SetLeft(line1, 10);
            Canvas.SetTop(line1, 0);

            Rectangle line2 = new Rectangle();
            line2.Height = 50;
            line2.Width = 5;
            line2.Fill = new SolidColorBrush(Colors.Black);
            Canvas.SetTop(line2, 0);
            Canvas.SetLeft(line2, 35);

            this.Children.Add(line1);
            this.Children.Add(line2);

            for (int i = 5; i <= 45; i = i + 10)
            {
                Rectangle temp = new Rectangle();
                temp.Height = 5;
                temp.Width = 30;
                temp.Fill = new SolidColorBrush(Colors.Black);
                Canvas.SetLeft(temp, 10);
                Canvas.SetTop(temp, i);

                this.Children.Add(temp);
            }
        }
    }
}
